package com.ipoint.icompany.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.validator.NotNull;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Role;

@Entity
@Name(Person.PERSON)
@Table(name = "Person")
@Role(name = Person.CURRENT_PERSON, scope = ScopeType.SESSION)
public class Person extends BaseObject {

	public static final String PERSON = "person";
	public static final String CURRENT_PERSON = "currentPerson";

	private Long id;
	private String name;
	private String email;
	private String username;
	private String password;

	@NotNull
	public String getEmail() {
		return email;
	}

	@Id
	@GeneratedValue
	public Long getId() {
		return id;
	}

	@NotNull
	public String getUsername() {
		return username;
	}

	@NotNull
	public String getName() {
		return name;
	}

	@NotNull
	public String getPassword() {
		return password;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setUsername(String login) {
		this.username = login;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setPassword(String password) {
		this.password = password;
	}
}
